package com.mtz.service;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author 煜赜
 * @date 2018/12/22 15:00
 */
public interface ExcelService {

    boolean batchImport(String fileName, MultipartFile file, String author) throws Exception;

    /** 创建表头 **/
    void createTitle(HSSFWorkbook workbook, HSSFSheet sheet);

    /** 生成excel文件 **/
    void buildExcelFile(String filename,HSSFWorkbook workbook) throws Exception;

    /** 浏览器下载excel **/
    void buildExcelDocument(String filename, HSSFWorkbook workbook, HttpServletResponse response) throws Exception;
}
